00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 require_once( "PHPUnit/Framework.php" );
00024
00025 define("PATH_TO_ROOT", "../../");
00026
00027 define("ADMIN", 1);
00028 define("STUDENT", 2);
00029 define("DOZENT", 3);
00030 define("SEKRETARIAT", 4);
00031 define("ALUMNUS", 5);
00032 define("SCHUELER", 6);
00033 define("GAST", 7);
00034
00035 require_once (PATH_TO_ROOT."common/classes/class.output.inc.php");
00036 require_once (PATH_TO_ROOT."common/classes/class.utilities.inc.php");
00037 require_once (PATH_TO_ROOT."common/classes/class.data.inc.php");
00038 require_once (PATH_TO_ROOT."ressourcen/classes/class.filemanger.inc.php");
00039
00040
00041 global $db;
00042 require_once (PATH_TO_ROOT.'common/estudy_connect.inc.php');
00043 require_once (PATH_TO_ROOT.'common/ez_sql.inc.php');
00044
00045
00046 global $SESSION;
00047 $_SESSION['userid'] = 1;
00048 $_SESSION["usergroup"] = ADMIN;
00049
00050 require_once (PATH_TO_ROOT.'/common/config.inc.php');
00051
00052
00053 class RessourcenTest extends PHPUnit_Framework_TestCase {
00054 protected $fm;
00055
00056 public function setUp() {
00057 $this->fm = new Filemanager();
00058 }
00059
00060 public function testShowTree() {
00061 $this->fm->showTree();
00062 }
00063 public function testShowFiles() {
00064 $this->fm->showFiles();
00065 }
00066
00067 }